From: Stefano Facchini Date: Fri, 23 Mar 2012 18:32:17 +0000 (+0100) Subject: popupMenu: make sure to break the grab when the slider is not visible X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6650 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3422e1dca76021a2ee98197ba511f6afa6174b38;p=gnome-shell.git popupMenu: make sure to break the grab when the slider is not visible Otherwise the grab will persist for example after closing the PopupMenu with Escape. https://bugzilla.gnome.org/show_bug.cgi?id=672713 --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index ace32e013..09a9b737d 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -546,6 +546,10 @@ const PopupSliderMenuItem = new Lang.Class({ this._slider.connect('repaint', Lang.bind(this, this._sliderRepaint)); this.actor.connect('button-press-event', Lang.bind(this, this._startDragging)); this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent)); + this.actor.connect('notify::mapped', Lang.bind(this, function() { + if (!this.actor.mapped) + this._endDragging(); + })); this._releaseId = this._motionId = 0; this._dragging = false;